package test.maxsubseq;

public class Solution {
    public static void main(String[] args) {
        int[] nums = {1, 3, 5, 4, 7};

        System.out.println(new Solution().findLengthOfLCIS(nums));
    }

    public int findLengthOfLCIS(int[] nums) {

        //[1,3,5,4,7]
        int count;
        int max = 0;
        int j;
        for (int i = 0; i < nums.length; i += j + 1) {
            count = 1;
            for (j = 0; i + j < nums.length - 1; j++) {
                if (nums[i + j] >= nums[i + j + 1]) {
                    break;
                }
                count++;
            }
            max = Math.max(max, count);
        }
        return max;
    }
}
